package com.lm.service.impl;

import com.lm.dao.LmProductCashDao;
import com.lm.model.LmProductCash;
import com.lm.service.LmProductCashService;
import com.meirengu.service.impl.BaseServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * LmProductCash服务实现层
 *
 * @author Mao
 * @create Wed May 09 14:15:28 CST 2018
 */
@Service
public class LmProductCashServiceImpl extends BaseServiceImpl<LmProductCash> implements LmProductCashService {

    private Logger logger = LoggerFactory.getLogger(LmProductCashServiceImpl.class);

    @Autowired
    private LmProductCashDao lmProductCashDao;

    @Override
    public List<LmProductCash> getModel(Map map) {
        return lmProductCashDao.getModel(map);
    }

    @Override
    public Integer updateNum(LmProductCash lmProductCash) {
        return lmProductCashDao.updateNum(lmProductCash);
    }

    @Override
    public Integer updateStatus(LmProductCash lmProductCash) {
        logger.info("updateStatus, id:{}", lmProductCash.getId());
        return lmProductCashDao.updateStatus(lmProductCash);
    }

    @Override
    public Integer updateTotalUv(Integer productId) {
        logger.info("updateTotalUv, productId:{}", productId);
        return lmProductCashDao.updateTotalUv(productId);
    }

}
